import wx

class DiaAbout(wx.Dialog):
    def __init__(self, parent, title, *args, **kwargs):
        super().__init__(parent, -1, title)
        MainSizer = wx.BoxSizer(wx.VERTICAL)
        BtnSizer = wx.BoxSizer(wx.HORIZONTAL)

        self.SetSizer(MainSizer)
        MainSizer.Fit(self)
        MainSizer.SetSizeHints(self)


if __name__ == "__main__":
    import os
    class MyFrame(wx.Frame):
        def __init__(self):
            super().__init__(None, -1, 'haha', size=(200, 100))
            btn = wx.Button(self, -1, 'baba', size=(10, 10))
            self.Bind(wx.EVT_BUTTON, self.OnClick, btn)

        def OnClick(self, event):
            # modal = DiaTable2add(self, 'baba').ShowModal()
            dia = DiaAbout(self, 'haha')
            modal = dia.ShowModal()
            dia.Destroy()

    app = wx.App()
    MyFrame().Show()
    app.MainLoop()